package cn.glutnn.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.glutnn.entity.Purchase;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;

import java.util.List;


/**
 * (Purchase)表数据库访问层
 *
 * @author msh
 * @since 2024-10-25 09:35:24
 */
public interface PurchaseMapper extends BaseMapper<Purchase> {

    @Insert("INSERT INTO tb_purchase (own_name, purchase_type,total_price,address,purchase_status,create_time,update_time) VALUES " +
            "(#{ownName}, #{purchaseType}, #{totalPrice}, #{address}, #{purchaseStatus}, #{createTime}, #{updateTime})")
    @Options(useGeneratedKeys = true, keyProperty = "purchaseId")
    void insertPurchase(Purchase purchase);
}

